<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>相对布局</title>
    <style>
        div:nth-child(1){
            width: 100px;
            height: 100px;
            background: #0043d3;
        }
        div:nth-child(2){
            width: 100px;
            height: 100px;
            background: red;
            position: relative;
            top: 3px;
            left: 3px;
        }
        div:nth-child(3){
            width: 100px;
            height: 100px;
            background: yellow;
            position: relative;
            top: 3px;
        }

    </style>
</head>
<body>
<div id="demo">
    <div></div>
    <div></div>
    <div></div>
</div>
</body>
</html>